home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Requesting a new frame shape
- Sent: 6/12/96 1:44 PM
- Received: 6/12/96 2:31 PM
- From: Neal Williams, neal@corda.com
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- >>I am requesting a new frame shape for my frame, but it's not working
- >right.
- >>
- >>Here is the code I use:
- >>
- >>ODShape* TheShapeIWant = MyODFrame->CreateShape(ev);
- >>TheShapeIWant->SetRectangle(ev, &MyODRect);
- >>ODShape* MyNewShape = MyODFrame->RequestFrameShape(ev,
- >TheShapeIWant,
- >>kODNULL);
- >>MyODFrame->Invalidate(ev, kODNULL, kODNULL);
- >>MyODFrame->ChangeUsedShape(ev, kODNULL, kODNULL);
- >>MyODFrame->InvalidateActiveBorder(ev);
- >>MyNewShape->Release(ev);
- >>TheShapeIWant->Release(ev);
- >>
- >>After executing this code my active border changes to be the size of my
- >>frame shape, but the clip-shape and active-shape of my facet don't
- >appear
- >>to be updating correctly. Afterwards, If I click in the undisplayed
- >portion
- >>of my frame I get a one-way trip to the debugger.
- >>
- >>BTW, I'm embeded within ODF Draw.
- >>
- >>I used this same code in my non-ODF OpenDoc part and everything
- >worked
- >>fine.
- >>
- >>-Neal
- >
- >I don't know yet why the clipshape is not updated. For the active shape
- >your are responsible to update it. When you call RequestFrameShape,
- >FrameShapeChanged is not called so you need to update both your used
- >shape and active shape the same way you do it in FrameShapeChanged.
- >
- >........................................................................
- > Henri Lamiraux lamiraux@apple.com
- > Apple Computer, Inc. OpenDoc(tm) Development Framework
- >........................................................................
- >
-
- I added the code to update the active shape and it still didn't work. I
- then dug around in the FW code and found the method
- FW_CFrame::RequestFrameShape(), I tried using it instead and now everything
- works fine : )
-
- -Neal
-